<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>菜单列表-<script>document.write(location.search.indexOf("id")>0?"修改资源":"新增资源");</script></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <link rel="stylesheet" href="../../../assets/css/font.css">
    <link rel="stylesheet" href="../../../assets/css/xadmin.css">
    <link rel="stylesheet" href="../../../assets/lib/layuiext/module/dtree/dtree.css">
    <link rel="stylesheet" href="../../../assets/lib/layuiext/module/dtree/font/dtreefont.css">
</head>
<style type="text/css">
    #parentIdCard{position: absolute;max-height: 500px;height: 350px;overflow: auto;width: 100%;z-index: 123;display: none;border:1px solid silver;top: 42px;}
    .layui-show{display: block!important;}
</style>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
          <a href="../../index/welcome.html">首页</a>
          <a><cite>系统管理</cite></a>
          <a href="menuList.html">资源列表</a>
          <a><cite><script>document.write(location.search.indexOf("id")>0?"修改资源":"新增资源");</script></cite></a>
      </span>
    <a class="layui-btn layui-btn-sm layui-btn-normal" style="line-height:1.6em;margin-top:4px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="x-body">
    <fieldset class="layui-elem-field layui-field-title">
        <legend><script>document.write(location.search.indexOf("id")>0?"修改资源":"新增资源");</script></legend>
    </fieldset>
    <form id="formForm" style="width: 500px" class="layui-form" action="">
        <input type="hidden" name="id">
        <input type="hidden" name="parentId" id="parentId">
        <div class="layui-form-item">
            <label class="layui-form-label">类型类型</label>
            <div class="layui-input-block">
                <input type="radio" name="type" value="0" title="目录" lay-filter="menuTypeFilter" >
                <input type="radio" name="type" value="1" title="菜单" lay-filter="menuTypeFilter" checked="" >
                <input type="radio" name="type" value="2" title="按钮" lay-filter="menuTypeFilter">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">资源名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="name"  class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">上级菜单</label>
            <div class="layui-input-block">
                <div class="layui-unselect layui-form-select" id="parentIdDiv">
                    <div class="layui-select-title">
                        <input type="text" name="parentName" id="parentName" placeholder="请选择" readonly="" class="layui-input layui-unselect">
                        <i class="layui-edge"></i>
                    </div>
                </div>
                <div class="layui-card" id="parentIdCard">
                    <div class="layui-card-body">
                        <div id="toolbarDiv"><ul id="slTree" class="dtree" data-id="-1" style="width: 100%;"></ul></div>
                    </div>
                </div>

            </div>
        </div>

        <div class="layui-form-item url">
            <label class="layui-form-label">菜单路由</label>
            <div class="layui-input-block">
                <input type="text"  name="url" lay-verify="menuUrl"  class="layui-input" placeholder="菜单路由"/>
            </div>
        </div>
        <div class="layui-form-item perms">
            <label class="layui-form-label">授权标识</label>
            <div class="layui-input-block">
                <input type="text" name="perms"  class="layui-input " placeholder="多个用逗号分隔, 如: user:list,user:create"/>
            </div>
        </div>
        <div class="layui-form-item orderNum">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" name="orderNum" lay-verify="orderNum" value="1" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">系统菜单</label>
            <div class="layui-input-block">
                <input type="checkbox" name="isSystem" id="isSystem" lay-skin="switch"  value="1"  lay-text="是|否">
                <span class="red" >*如果为系统菜单，则其它组织的角色授权时不能查询到此菜单</span>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="formSubmitFilter">保存</button>
                <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="location.href='menuList.html'">取消</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="../../../assets/js/lib.js"></script>
<script type="text/javascript" src="menuForm.js"></script>
<script>

</script>
</body>
</html>
